/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package teste.Mediator;

import java.util.ArrayList;
import teste.Colleague;

/**
 *
 * @author Caio
 */
public class GolpeMediator implements Mediator {
    
    
    protected ArrayList<Colleague> personagens;
    
    public GolpeMediator(){
        personagens = new ArrayList<Colleague>();
    }

    @Override
    public void enviar(Double forca,Colleague colleague) {
        for (Colleague personagem : personagens) {
            if (colleague != personagem){
                personagem.defender(forca);
            }            
        }
    }
    public void adicionarColleague(Colleague colleague){
            personagens.add(colleague);
    }
    
    }
 
   
